//
//  EnoteModelFrame.m
//  Enote
//
//  Created by Jack on 2016/10/24.
//  Copyright © 2016年 Jack. All rights reserved.
//

#import "EnoteModelFrame.h"

@implementation EnoteModelFrame

+ (instancetype)enoteWithModel:(Enote *)model {
    
    EnoteModelFrame * modelFrame = [[self alloc] initWithModel:model];

    return modelFrame;
}

- (instancetype)initWithModel:(Enote *)model
{
    self = [super init];
    if (self) {
        _model = model;
        
        NSString * content = model.content;
       _size =  [content boundingRectWithSize:CGSizeMake((SCREEN_WIDTH - 30) / 2, CGFLOAT_MAX) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:14]} context:nil].size;
        
        
    }
    return self;
}


@end
